package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.packet.Packet;

public class PacketIDFilter
  implements PacketFilter
{
  private String packetID;

  public PacketIDFilter(String paramString)
  {
    if (paramString == null)
      throw new IllegalArgumentException("Packet ID cannot be null.");
    this.packetID = paramString;
  }

  public boolean accept(Packet paramPacket)
  {
    return this.packetID.equals(paramPacket.getPacketID());
  }

  public String toString()
  {
    return "PacketIDFilter by id: " + this.packetID;
  }
}